from websocket_server import WebSocketServer
from mediapipe_processor import MediaPipeProcessor


def main():
    server_url = 'ws://localhost:3000'  # 设置WebSocket服务器的URL
    ws_server = WebSocketServer(server_url)  # 创建WebSocket服务器对象
    MediaPipeProcessor()

    # 可以设置处理数据的回调，例如将MediaPipe处理过程绑定到WebSocket消息接收过程
    # ws_server.on_message = mp_processor.process_frame

    ws_server.start()  # 启动WebSocket服务器


if __name__ == "__main__":
    main()
